const fs = require("fs");

let My404 = function(request,response,next){
	response.status(404);
	//用跳转解决重定向两次执行
	response.writeHead(200,{
		'Content-Type':'text/html'
	});
	fs.readFile('./web/404.html','utf8',function(err,data){
		if(err){
			throw err;
		}
		response.end(data);
	});
}
module.exports = My404;